<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <script type="text/javascript">
        var iPi = Math.PI;
        //alert(iPi);

        /*         var iNum = Math.random();
                alert(iNum); */

        var arR = [];
        for (var i = 0; i < 20; i++) {
            var iNum = Math.random();
            arR.push(iNum);
        }
        //alert(arR);
        // console.log(arR);

        /*         alert(Math.floor(5.6)); //向下取整
                alert(Math.ceil(5.6));  //向上取整 */

        var iNum01 = 10;
        var iNum02 = 20;

        //0-10的随机数  
        var arr2 = [];

        for (var i = 0; i < 40; i++) {
            var iNum = Math.floor((iNum02 - iNum01) * Math.random() + iNum01 + 1);
            arr2.push(iNum);
        }
        console.log(arr2);
    </script>
    <title>Document</title>
</head>

<body>


</body>

</html>